package com.it00zyq.admin.result;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author it00zyq
 * @since 2022-04-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class HotArticleResult implements Serializable, Comparable<HotArticleResult> {

    /**
     * 编号
     */
    private Integer id;

    /**
     * 标题
     */
    private String title;

    /**
     * 阅读量
     */
    private Integer readCount;

    @Override
    public int compareTo(HotArticleResult result) {
        return result.getReadCount().compareTo(readCount);
    }
}
